# Default values for logsidecar-injector.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: {{ logging.logsidecar.replicas | default(2) }}

image:
  repository: {{ ks_log_sidecar_injector_repo }}
  tag: {{ ks_log_sidecar_injector_tag }}
  pullPolicy: IfNotPresent

resources:
  limits:
    cpu: {{ logging.logsidecar.resources.limits.cpu | default("100m") }}
    memory: {{ logging.logsidecar.resources.limits.memory | default("100Mi") }}
  requests:
    cpu: {{ logging.logsidecar.resources.requests.cpu | default("10m") }}
    memory: {{ logging.logsidecar.resources.requests.memory | default("10Mi") }}

configReloader:
  image:
    repository: {{ configmap_reload_repo }}
    tag: {{ configmap_reload_tag }}
    pullPolicy: IfNotPresent
  resources:
    limits:
      cpu: 100m
      memory: 100Mi
    requests:
      cpu: 10m
      memory: 10Mi

{% if logging.nodeSelector is defined and logging.nodeSelector is not none %}
nodeSelector:
  {{ logging.nodeSelector | to_nice_yaml(indent=2) | indent(4) }}
{% elif nodeSelector is defined and nodeSelector is not none %}
nodeSelector:
  {{ nodeSelector | to_nice_yaml(indent=2) | indent(4) }}
{% else %}
nodeSelector: {}
{% endif %}
{% if logging.tolerations is defined and logging.tolerations is not none %}
tolerations:
  {{ logging.tolerations | to_nice_yaml(indent=2) | indent(4) }}
{% elif tolerations is defined and tolerations is not none %}
tolerations:
  {{ tolerations | to_nice_yaml(indent=2) | indent(4) }}
{% else %}
tolerations: []
{% endif %}
{% if logging.affinity is defined and logging.affinity is not none %}
affinity:
  {{ logging.affinity | to_nice_yaml(indent=2) | indent(2) }}
{% elif affinity is defined and affinity is not none %}
affinity:
  {{ affinity | to_nice_yaml(indent=2) | indent(2) }}
{% else %}
affinity: {}
{% endif %}

sidecar:
  container:
    image:
      repository: {{ filebeat_repo }}
      tag: {{ filebeat_tag }}
      pullPolicy: IfNotPresent
    resources: {}
  initContainer:
    image:
      repository: {{ alpine_repo }}
      tag: {{ alpine_tag }}
      pullPolicy: IfNotPresent
    resources: {}
